import 'package:flutter/cupertino.dart';

import 'MyColor.dart';

class Global {
  static int Resident = 1;
  static int Estate = 2;
  static int userType = 0;

  static String deviceId = "";
  static List<dynamic> communityList = [];

  static String token = "";
  static String firebasetoken = "";

  static getShadow(Color color) {
    return BoxShadow(
        color: color,
        offset: Offset(0.0, 4.0), //阴影xy轴偏移量
        blurRadius: 4.0, //阴影模糊程度
        spreadRadius: 0//阴影扩散程度
        );
  }

  static getBoxBg(double radius, Color color) {
    return BoxDecoration(color: color, borderRadius: BorderRadius.circular(radius));
  }

  static getWhiteBg(double radius) {
    return BoxDecoration(color: MyColor.White, borderRadius: BorderRadius.circular(radius));
  }

  static getRedBg(double radius) {
    return BoxDecoration(color: MyColor.Red, borderRadius: BorderRadius.circular(radius));
  }

  static getWhiteBg_shadow(double radius, Color color) {
    return BoxDecoration(boxShadow: [getShadow(color)], color: MyColor.White, borderRadius: BorderRadius.circular(radius));
  }

  static getOrangeBg_shadow(double radius, Color color) {
    return BoxDecoration(boxShadow: [getShadow(color)], color: MyColor.Orange, borderRadius: BorderRadius.circular(radius));
  }

  static const String netImage = "http://n.sinaimg.cn/tech/5_img/upload/e5308a4d/108/w1024h684/20210223/6449-kkmphps3300335.jpg";
  static const String netQrImage =
      "https://qr.api.cli.im/newqr/create?data=sssssssss&level=H&transparent=false&bgcolor=%23FFFFFF&forecolor=%23000000&blockpixel=12&marginblock=1&logourl=&logoshape=no&size=260&kid=cliim&key=d8fe3b151a9067dc9034d63da6ff3c44";
}
